package model.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * Created with IntelliJ IDEA.
 * User: ashishov
 * Date: 4/9/13
 * Time: 7:29 PM
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name="APPARTMENTS", schema = "JPA")
public class Appartment implements Serializable {
    @Id
    private int id;
    @Column(name="ADDRESS")
    private String address;
    @Basic(fetch = FetchType.LAZY)
    private int value; //квадратные метры
    private double cost;

    private int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getAddress() {
        return address;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public double getCost() {
        return cost;
    }

    public void setCost(double cost) {
        this.cost = cost;
    }
}
